<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simTextEditorOpen</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1>Regular API function</h1>
<h3 class=subsectionBar><a name="simTextEditorOpen" id="simTextEditorOpen"></a>sim.textEditorOpen</h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Opens a text edition window. See <a href="simOpenTextEditor.htm">simOpenTextEditor</a> for the C version of this function. See also <a href="simTextEditorClose.htm">sim.textEditorClose</a>, <a href="simTextEditorShow.htm">sim.textEditorShow</a> and <a href="simTextEditorGetInfo.htm">sim.textEditorGetInfo</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn><div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam><div></div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div></div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn><div>int handle=sim.textEditorOpen(string initText,string properties)</div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>initText</strong>: the initial text to be displayed.</div>
<div><strong>xml</strong>: an XML description of the text editor's properties. Can be an empty string for default properties. Following is a valid content:</div>
<br>

<pre class=lightRedBoxNoMarginAndSmall>&lt;editor title=&quot;Window title&quot; editable=&quot;true&quot; searchable=&quot;true&quot;
  tab-width=&quot;4&quot; toolbar=&quot;false&quot; statusbar=&quot;false&quot; resizable=&quot;true&quot; modal=&quot;false&quot;
  on-close=&quot;callbackFunction&quot; closeable=&quot;true&quot; position=&quot;100 100&quot; size=&quot;800 600&quot;
  placement=&quot;absolute&quot; font=&quot;Courier&quot; font-size=&quot;14&quot; activate=&quot;false&quot; editable=&quot;true&quot;
  line-numbers=&quot;true&quot; max-lines=&quot;0&quot; is-lua=&quot;true&quot; wrap-word=&quot;false&quot;
  text-col=&quot;50 50 50&quot; background-col=&quot;190 190 190&quot; selectionColor=&quot;128 128 255&quot;
  comment-col=&quot;0 140 0&quot; number-col=&quot;220 0 220&quot; string-col=&quot;255 255 0&quot;
  character-col=&quot;255 255 0&quot; operator-col=&quot;0 0 0&quot; identifier-col=&quot;64 64 64&quot;
  preprocessor-col=&quot;0 128 128&quot; keyword1-col=&quot;152 0 0&quot; keyword2-col=&quot;220 80 20&quot;
  keyword3-col=&quot;0 0 255&quot; keyword4-col=&quot;152 64 0&quot;&gt;

  &lt;keywords1&gt;
    &lt;item word=&quot;sim.getObjectHandle&quot; autocomplete=&quot;true&quot;
      calltip=&quot;number handle=sim.getObjectHandle(string path)&quot; /&gt;
    &lt;item word=&quot;sim.getObjectPosition&quot; autocomplete=&quot;true&quot;
      calltip=&quot;table[3] pos=sim.getObjectPosition(number handle,
        number relHandle)&quot; /&gt;
  &lt;/keywords1&gt;
  &lt;keywords2&gt;
    &lt;item word=&quot;sim.getObjectOrientation&quot; autocomplete=&quot;true&quot;
      calltip=&quot;table[3] euler=sim.getObjectOrientation(number handle,
        number relHandle)&quot; /&gt;
  &lt;/keywords2&gt;
&lt;/editor&gt;</pre>
<em>placement </em> attribute recognizes following values: <em>center</em>, <em>absolute</em> and <em>relative</em>.

</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>handle</strong>: the handle of the text editor.</div>
</td> 
</tr> 
</table> 


<br>
</td>
</tr>
</table>
</div>
</body>
</html>
